package ch.connection;

import ch.exception.UserNotFoundException;

/** Classe per la lettura del messaggio
 * 
 * @author Giovanni Franza - GPLv3 - 8/6/2011
 *
 */

public class User implements Control {


	public Object verify( String data, Object object ) {
		Object obj;
		// se mi arriva l'indirizzo tra <> lo strippo
		if( data.charAt(0)=='<' ) {
			data=data.substring(1,data.length()-1);
		}
		try {
			obj = ch.mailbox.User.getUser( data );
		} catch( UserNotFoundException e ) {
			System.out.println( "Attempt to access to unknown mailbox: " + data );
			obj = null;
		}		
		return obj;
	}
	public String getResponse( Object obj ) {
		return null;
	}
}
